{template 'common/header-gw'}
<ol class="breadcrumb">
	<li><a href="./?refresh"><i class="fa fa-home"></i></a></li>
	<li><a href="{url 'system/welcome'}">系统</a></li>
	<li class="active">站点信息设置</li>
</ol>
<ul class="nav nav-tabs">
	<li{if $do == 'copyright'} class="active"{/if}><a href="{php echo url('system/site');}">站点信息</a></li>
</ul>
<div class="clearfix">
	<form action="" method="post"  class="form-horizontal" role="form" enctype="multipart/form-data" id="form1">
		<h5 class="page-header">关闭站点</h5>
		<div class="form-group">
			<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">关闭站点</label>
			<div class="col-sm-10 col-xs-12">
				<label class="radio-inline">
					<input type="radio" name="status" {if $settings['status'] == 1} checked="checked" {/if} value="1" /> 是
				</label>
				<label class="radio-inline">
					<input type="radio" name="status" {if $settings['status'] == 0} checked="checked" {/if} value="0" /> 否
				</label>
			</div>
		</div>
		<div class="form-group reason" {if $settings['status'] == 0} style="display:none;" {/if}>
			<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">关闭原因</label>
			<div class="col-sm-10 col-xs-12">
				<textarea style="height:150px;" class="form-control" cols="70" name="reason" autocomplete="off">{$settings['reason']}</textarea>
				<input type="hidden" name="reasons" value="{$settings['reason']}">
			</div>
		</div>
	<h5 class="page-header">登录站点</h5>
	<div class="form-group">
		<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">是否开启验证码</label>
		<div class="col-sm-10 col-xs-12">
			<label class="radio-inline">
			<input type="radio" name="verifycode" {if $settings['verifycode'] == 1} checked="checked" {/if} value="1" /> 是
			</label>
			<label class="radio-inline">
				<input type="radio" name="verifycode" {if $settings['verifycode'] == 0} checked="checked" {/if} value="0" /> 否
			</label>
		</div>
	</div>
		<div class="form-group">
			<div class="col-sm-offset-2 col-md-offset-2 col-lg-offset-1 col-xs-12 col-sm-10 col-md-10 col-lg-11">
				<input name="submit" type="submit" value="提交" class="btn btn-primary span3" />
				<input type="hidden" name="token" value="{$_W['token']}" />
			</div>
		</div>
	</form>
	<script type="text/javascript">
			$("#form1").submit(function() {
				if ($("input[name='status']:checked").val() == 1) {
					if ($("textarea[name='reason']").val() == '') {
						util.message('请填写站点关闭原因');
						return false;
					}
				}
			});
			$("input[name='status']").click(function() {
				if ($(this).val() == 1) {
					$(".reason").show();
					var reason = $("input[name='reasons']").val();
					$("textarea[name='reason']").text(reason);
				} else {
					$(".reason").hide();
				}
			});
	</script>
</div>
{template 'common/footer-gw'}
